package pt.mynotesmain;

import java.util.Date;

import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.EditText;

public class MyNotes_TextActivity extends MyNotesMain {

	
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main_aula);
       //EditText et1=(EditText) findViewById(R.id.EtTitulo);
      
       
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_main_aula, menu);
        return true;
    }
    
    public void onCancelar(){
    	finish();
    }
    public void onGravar(View v){
    	EditText et1=(EditText) findViewById(R.id.EtTitulo);
    	EditText et2=(EditText) findViewById(R.id.EtNota);
    	
    	MyTextNote nota = new MyTextNote();
    	nota.strTitulo =et1.getText().toString();
    	nota.strNota =et2.getText().toString();
    	nota.dtData = new Date();
    	
    	MyNotesMain.lstNotas.add(nota);
    	
    	finish();
    }
}
